1. Field Of The Invention
The present invention generally relates to an apparatus for processing embroidery data used for filling an embroidery area with stitches, and particularly to such an apparatus which divides an embroidery area into subareas and produces a set of embroidery data for filling each of the subareas with stitches.
2. Related Art Statement
The Applicant has proposed an embroidery data processing apparatus capable of automatically producing embroidery data. The processing apparatus includes (a) division base point determining means, (b) division aid point determining means, (c) embroidery area dividing means, and (d) embroidery data producing means.
The division base point determining means selects a division base point from a plurality of defining points predetermined on an outline of an embroidery area, based on outline data representative of the outline of the embroidery area. The division base point is utilized for defining a division line which divides the embroidery area into subareas.
An embroidery area to be filled with stitches may be a polygon, or a figure which is not a polygon but is approximated by a polygon. In these cases, the defining points predetermined on the outline of the embroidery area may be the vertices of the polygon. In addition, in the case where the outline of an embroidery area is approximated by a function such as a spline function, the defining points predetermined on the outline may be the points provided by the function.
The division aid point determining means selects, based on the outline data, a division aid point from the defining points. The division aid point cooperates with the division base point to define the division line.
The embroidery area dividing means divides the embroidery area into the two subareas by the division line.
The embroidery data producing means produces a set of embroidery data used for filling each of the subareas with stitches. Generally, a set of embroidery data consists of sets of stitch position data each of which is representative of a stitch position at which a needle pierces a workfabric to form a stitch. However, in the case where a subarea is further divided into blocks arranged along a central-line direction of the subarea (more specifically described, directions at respective positions on a single curve or polygonal line approximating the subarea), a set of embroidery data may consist of sets of block data each of which is representative of the outline of a corresponding one of the blocks. In this case, an additional means is required, which automatically produces, upon actual embroidering, sets of stitch position data based on each set of block data and the number of stitches per unit area, so that the sets of stitch position data are used for filling a corresponding block with stitches. Thus, the term "embroidery data" is used to indicate both stitch position data, and block data used for providing stitch position data. Furthermore, in the case where the embroidery data producing means comprises means for producing stitch position data, the stitch position data producing means may be of a type which produces stitch position data directly based on a subarea, or of a type which produces block data based on a subarea and subsequently produces stitch position data based on the block data.
Further search and study of the Applicant have proved that the above apparatus needs improvements. The division aid point determining means of the apparatus automatically determines a division aid point, irrespective of the shape of an outline of a subarea resulting from dividing an embroidery area by utilizing the division aid point. Therefore, in some cases, a division line provided by utilizing a division aid point inappropriately divides an embroidery area into two subareas such that the outline of one or both of the subareas has an inappropriate shape. For example, in the case of dividing an embroidery area shown in FIG. 9, inappropriate division lines, d-i and o-t, are determined, and inappropriate subareas are provided.
The division of the embroidery area of FIG. 9 is an example of division effected by an apparatus developed by the Applicant, which apparatus is disclosed in Japanese Patent Application No. 1-266548 (1989) and U.S. patent application Ser. No. 07/593,026 (1990). The apparatus includes (a) deflection point determining means for determining a reference direction with respect to an embroidery area and successively checking, based on outline data, defining points in an order of location thereof on an outline of the embroidery area, for a deflection point with respect to the reference direction, and (b) deflection direction determining means for determining, based on the outline data, whether or not the deflection point is an outward deflection point. The apparatus determines the outward deflection point as a division base point, and divides the embroidery area into subareas by a division line defined by the division base point and a division aid point determined by the division aid point determining means thereof.
The deflection point determining means of the above apparatus (i) applies a coordinate system to the embroidery area; (ii) judges whether or not two adjacent defining points preceding and following each of the defining points are both located in one or two half planes defined in the coordinate system on respective sides of a straight line which extends passing that each defining point in a direction perpendicular to the reference direction of the area and (iii) determines as a deflection point a defining point for which an affirmative judgement is provided.
In addition, the deflection direction determining means determines, in the case where the deflection point determining means successively checks the defining points on the outline in a clockwise direction, the deflection point as an outward deflection point if the adjacent defining point following the deflection point is located on a left-hand side of the deflection point as viewed in a direction of a vector starting at the adjacent defining point preceding the deflection point and ending at the deflection point and, on the other hand, in the case where the deflection point determining means successively checks the defining points in a counterclockwise direction, determines the deflection point as an outward deflection point if the adjacent defining point following the deflection point is located on a right-hand side of the deflection point as viewed in a direction of a vector starting at the adjacent defining point preceding the deflection point and ending at the deflection point.
The deflection point determining means of the above apparatus includes reference direction determining means for selecting the most distant two defining points from the defining points on the outline of the embroidery area, and determines as the reference direction a direction of a straight line, L (FIG. 9), passing the most distant two defining points. The division aid point determining means of the apparatus applies a coordinate system to the embroidery area, selects one or more of the defining points which is or are placed in one of two half planes provided in the coordinate system on respective sides of a straight line passing the division base point in a direction perpendicular to the line L which one half plane does not contain the two adjacent defining points preceding and following the division base point on the outline of the embroidery area, and determines as a division aid point one of the selected defining points which is the nearest to the division base point. When the apparatus is operated for dividing the embroidery area of FIG. 9, defining points, d and o, are selected as division base points from defining points through x defining the embroidery area, and defining points, i and t, are determined as division aid points corresponding to the division base points d and o, respectively.
Since the embroidery area of FIG. 9 includes branched portions, the embroidery area can be considered as a figure resulting from superposing a plurality of elongate figures each of which is approximated by a single straight line or curve. In such a case, it is required to divide the embroidery area into subareas, with consideration of the existence of the elongate figures behind the embroidery area. In other words, it is very important to determine a division line which divides the embroidery area into two subareas such that the outline of at least one of the subareas has a sufficient smoothness in the region of the division line.
However, as previously indicated, the embroidery area of FIG. 9 is divided by the above apparatus into inappropriate subareas by inappropriate division lines, d-i and o-t, indicated in broken lines in the figure. In other words, the embroidery area is divided without consideration of the existence of superposed elongate figures behind it, and the subareas resulting from dividing the embroidery area have no sufficient smoothness in the region of the division lines. If an embroidery area is inappropriately divided into subareas having inappropriate outlines, inappropriate embroidery data are produced based on the inappropriate subareas. Consequently, the stitches formed in one subarea in an embroidery direction thereof (indicated at arrow in FIG. 9) border upon the stitches formed in another subarea in a different embroidery direction, at an inappropriate location in the embroidery area, thereby lowering the quality of the embroidery produced.
The above indicated technique is of a type which divides an embroidery area so that the outline of each of the subareas resulting therefrom has no outward deflection point. The problem of inappropriately dividing a particular embroidery area, is found with another type of technique disclosed by the Applicant, for example in Japanese Patent Application No. 1-266549 and the previously indicated U.S. patent application Ser. No. 07/593,026 (1990). According to the another or second technique, an embroidery area is divided so that all straight segments obtained by connecting each of the most distant two defining points on the outline of each of the subareas resulting from dividing the embroidery area, and each of the other or remainder defining points on the outline, are contained inside the outline. In addition, the above problem is found with a third technique which divides an embroidery area by first applying the above indicated, first technique utilizing an outward deflection point, and subsequently applying the second technique.